//商品的业务逻辑接口
//import {baseContextUrl} from "./baseUrl.js";
//const baseUrl = "http://localhost:8080/itemsdemo/";

function queryGoodsListByCatalog(catalog){
    const promise = new Promise((resolve, reject) => {
        $.ajax({
            url: baseUrl + 'goods/catalog/'+catalog,
            type: 'GET',
            dataType: 'json',
            async: true,
            success: resp => {
                resolve(resp);
            },
            error: err => {
                //console.log(err);
                reject(err);
            }
        })
    })
    return promise;
}

